input()
a = list(input().split())
eps = 1e-3


def isLegal(x):
    try:
        f = float(x)
        if not -1000 <= f <= 1000:
            return False
        if '.' not in x:
            return True
        else:
            return len(x)-x.find('.') < 4
    except:
        return False


res = []
for i in a:
    if isLegal(i):
        res.append(float(i))
    else:
        print('ERROR:', i, 'is not a legal number')

n = len(res)
if n == 1:
    print('The average of 1 number is %.2f' % res[0])
elif n:
    ave = sum(res)/n
    print('The average of', n, 'numbers is %.2f' % ave)
else:
    print('The average of 0 numbers is Undefined')
